[Pharo-users] Gtoolkit and fast trees

2018-09-26 Thread Arturo Zambrano
Hi,
 I would like to understand the differences between   tree and fastTree.
 I've got different behavior between tree and fastTree, the second failing
with
a subscript out of bounds.
It happens when I expand the root node and select one of the children.
 it seems that the rootNode cannot find the children... (see below a
screenshot).
  What is more strange is that using the same dataset sometimes it works as
expected and sometimes not...  I could not reproduce it in a short script
(yet).
 Any pointer is welcome

Thanks.

[image: image.png]


Re: [Pharo-users] [Pharo-dev] [ANN] Success story Mobility Map

2018-09-26 Thread Norbert Hartl



> Am 25.09.2018 um 17:44 schrieb Sven Van Caekenberghe :
> 
> 
> 
>> On 25 Sep 2018, at 14:39, Norbert Hartl  wrote:
>> 
>> 
>> 
>>> Am 25.09.2018 um 12:52 schrieb Sven Van Caekenberghe :
>>> 
>>> Wow. Very nice, well done.
>>> 
>>> Any chance on some more technical details, as in what 'connected by a 
>>> message queue for the communication' exactly means ? How did you approach 
>>> micro services exactly ?
>>> 
>> Sure :)
> 
> Thanks, this is very interesting !
> 
>> The installation spawns multiple physical machines. All the machines are 
>> joined to a docker swarm. The installation is reified as either task or 
>> service from the view on the docker swarm. Meaning you instantiate an 
>> arbitrary amount of services and docker swarm distributes them among the 
>> physical machines. Usually you don’t take control which is running where but 
>> you can. At this point you have spread dozens of pharo images among multiple 
>> machines and each of them has an IP address. Furthermore in docker swarm you 
>> have a reification of a network meaning that every instance in a network can 
>> see all other instances on this network. Each service can be reached by its 
>> service name in that network. Docker swarm does all the iptables/firewall 
>> and DNS setup for you.
> 
> Are you happy with docker swarm's availability/fail-over behaviour ? In other 
> words: does it work when one image/instance goes bad, does it detect and 
> restore the missing functionality ?
> 
Yes, I‘m very satisified. Instances are automatically restarted if they crash. 
And not necessarily on the same machine exactly how I expect it. Docker has 
something called Healthcheck. You can have a command executed every 20 seconds. 
I hooked this to a curl command and to your SUnit Rest handler. The rest is 
writing unit tests for server health. If tests fail in sequence the instances 
are taken out of operation and are replaced with a new instance. The same is 
done for updating. Instances are started in a fashion that one instance of the 
new image is started, if it survives a couple of health checks it is taken 
operational and an old one is taken out. Then the next new is started... For 
simple software updates you have zero-downtime deployment. 

>> In order to have communication between those runtimes we use rabbitmq 
>> because you were so nice writing a driver for it ;) The rabbitmq does have a 
>> support for cluster setup, meaning each of the physical machines has a 
>> rabbitmq installation and they know each other. So it does not matter to 
>> which instance you send messages to and on which you register for receiving 
>> messages. So every pharo image connects to the service rabbitmq and opens a 
>> queue for interaction.
> 
> Same question: does RabbitMQ's clustering work well under stress/problems ? 
> Syncing all queues between all machines sounds quite heavy (I never tried it, 
> but maybe it just works).

I did not yet have time to real stress test the queue. And you are right 
copying between nodes might be a lot but still I have the feeling it is better 
to have then a single instance but no  real reason. We also use huge payloads 
which might have to change if we encounter problems.
> 
>> Each service like the car sharing opens a queue e.g. /queue/carSharing and 
>> listens on it. The broker images are stateful so they open queues like 
>> /queue/mobility-map-afdeg32 where afdeg32 is the container id of the 
>> instance (hostname in docker). In each request the queue name to reply is 
>> sent as a header. So we can make sure that the right image gets the message 
>> back. This way we can have sticky sessions keeping volatile data in memory 
>> for the lifecycle of a session. There is one worker image which opens a 
>> queue /queue/mobility-map where session independent requests can be 
>> processed. 
> 
> I think I understand ;-)
> 
>> In order to ease development we are sharing code between the broker and the 
>> micro service. Each micro service has a -Common package where the classes 
>> are in that build the interface. The classes in here are a kind of data 
>> entity facades. They use NeoJSON to map to and from a stream. The class name 
>> is send with the message as a header so the remote side knows what to 
>> materialize. The handling is unified for the four cases 
>> 
>> - Request as inquiry to another micro service
>> - Response returns values to a Request
>> - Error is transferred like a Response but is then signalled on the 
>> receiving side
>> - Notification connects the announcers on the broker and the micro service 
>> side.
> 
> Yes, makes total sense.
> 
>> Asynchronous calls we solved using Promises and Futures. Each async call to 
>> the Q becomes a promise (that blocks on #value) and is combined to a future 
>> value containing all promises with support to generate a delta of all 
>> resolved promises. This we need because you issue a search that takes longer 
>> and you want to display results as 

Re: [Pharo-users] Pharo launcher

2018-09-26 Thread Trussardi Dario Romano
Ciao Christophe,


> Hi Dario,
> 
> The problem is probably fixed in the latest PharoLauncher version (1.4) 
> available from http://pharo.org/download.

Yes, i download the last Pharo launcher ( 1.4 ) and everything works,

> If not, as specified in the dialog text, please run the given command from 
> the command line to give us more information on what is the problem.
> 
Thanks, 

Dario

> Regards,
> Christophe
> 
>> Le 26 sept. 2018 à 12:05, Trussardi Dario Romano 
>>  a écrit :
>> 
>> Ciao,
>> 
>>  on Ubuntu system with Pharo Launcher 1.3
>> 
>>  after create a new Pharo 7.0-64 bit ( development version )
>> 
>>  when i launch the images the system answer :
>> 
>> Cannot determine image version: image version file not found!
>> Try to run this command in a shell to get more information on the problem:
>> cd "/opt/pharolauncher/pharo-vm/lib/pharo/5.0-201805090836" && export 
>> SQUEAK_PLUGINS="" && 
>> "/opt/pharolauncher/pharo-vm/lib/pharo/5.0-201805090836/pharo" --nodisplay 
>> "/home/party/Pharo/images/Pharo 7.0 - 64bit (180926)-01/Pharo 7.0 - 64bit 
>> (180926)-01.image" eval "(Smalltalk imagePath asFileReference parent) / 
>> 'pharo.version' writeStreamDo: [ :stream | |major minor|major := 
>> SystemVersion current major.minor := SystemVersion current 
>> minor.(major = 6 and: [ SystemVersion current highestUpdate >= 
>> 60509 ])ifTrue: [ minor := 1 ].stream
>>  << major asString; << minor asString ]"pha
>> 
>>  Thanks for considerations,
>> 
>>  Dario
>> 
>>  P.S. In the same environment one hold  Pharo 7.0-64 bit ( development 
>> version ) image ran well with launch command
> 



[Pharo-users] GTDocument how to

2018-09-26 Thread Hilaire
Hi,

I would like a document where user types in normal text and plugs in
DrGeo view. The drgeo view will be dual. It will be alternatively the
output of a DrGeo script (drgeo canvas) or the DrGeo script itself (code).

The view will be interactive. In drgeo canvas mode, user plays with the
geometric construction, when switched to code mode, the user edits the
DrGeo script and recompute the DrGeo canvas output.

Is GTDocument appropriate to do this? If so, where to start?

Thanks

Hilaire

-- 
Dr. Geo
http://drgeo.eu





Re: [Pharo-users] Pharo launcher

2018-09-26 Thread Christophe Demarey
Hi Dario,

The problem is probably fixed in the latest PharoLauncher version (1.4) 
available from http://pharo.org/download.
If not, as specified in the dialog text, please run the given command from the 
command line to give us more information on what is the problem.

Regards,
Christophe

> Le 26 sept. 2018 à 12:05, Trussardi Dario Romano  
> a écrit :
> 
> Ciao,
> 
>   on Ubuntu system with Pharo Launcher 1.3
> 
>   after create a new Pharo 7.0-64 bit ( development version )
> 
>   when i launch the images the system answer :
> 
> Cannot determine image version: image version file not found!
> Try to run this command in a shell to get more information on the problem:
> cd "/opt/pharolauncher/pharo-vm/lib/pharo/5.0-201805090836" && export 
> SQUEAK_PLUGINS="" && 
> "/opt/pharolauncher/pharo-vm/lib/pharo/5.0-201805090836/pharo" --nodisplay 
> "/home/party/Pharo/images/Pharo 7.0 - 64bit (180926)-01/Pharo 7.0 - 64bit 
> (180926)-01.image" eval "(Smalltalk imagePath asFileReference parent) / 
> 'pharo.version' writeStreamDo: [ :stream | |major minor|major := 
> SystemVersion current major.minor := SystemVersion current minor. 
>(major = 6 and: [ SystemVersion current highestUpdate >= 60509 ])  
>   ifTrue: [ minor := 1 ].stream << 
> major asString; << minor asString ]"pha
> 
>   Thanks for considerations,
> 
>   Dario
> 
>   P.S. In the same environment one hold  Pharo 7.0-64 bit ( development 
> version ) image ran well with launch command



[Pharo-users] IoT hackathon @zweidenker

2018-09-26 Thread Norbert Hartl
Hi,

we (ZWEIDENKER) and RModD organized an IoT Hackathon in cologne at 19th of 
october 2018. The plan will be:

- Allex Oliviera will present the tutorial he made on PharoThings [1]. The 
audience will try it in a hands-on-session and give feedback to improve it. 
Zweidenker is sponsoring the hardware so nobody has to bring anything to the 
session
- We are collecting ideas at the moment what we want to do with the learnings 
from Allex, meaning what hardware to build 
- If you have ideas about what to build with real life things that should be 
connected from pharo, please tell us. We will compile a list of ideas and for 
the first two or three we will buy the necessary hardware so we can build it at 
that day

The Hackathon will take place at

ZWEIDENKER GmbH
Luxemburger Str. 72
50674 Köln
germany

As we have a limited amount of seats you need to register if you are 
interested. Go to http://zweidenker.de/en/iot-hackathon-2018 
 to register your seat on the 
session. If there are more participants than seats we will have to do selection 
by dice rolling. Registration period ends on 5th of october so you will know in 
advance if you can come.

See you there,

Norbert on behalf of ZWEIDENKER

[1] https://github.com/pharo-iot/PharoThings 


[Pharo-users] Pharo launcher

2018-09-26 Thread Trussardi Dario Romano
Ciao,

on Ubuntu system with Pharo Launcher 1.3

after create a new Pharo 7.0-64 bit ( development version )

when i launch the images the system answer :

Cannot determine image version: image version file not found!
Try to run this command in a shell to get more information on the problem:
cd "/opt/pharolauncher/pharo-vm/lib/pharo/5.0-201805090836" && export 
SQUEAK_PLUGINS="" && 
"/opt/pharolauncher/pharo-vm/lib/pharo/5.0-201805090836/pharo" --nodisplay 
"/home/party/Pharo/images/Pharo 7.0 - 64bit (180926)-01/Pharo 7.0 - 64bit 
(180926)-01.image" eval "(Smalltalk imagePath asFileReference parent) / 
'pharo.version' writeStreamDo: [ :stream | |major minor|major := 
SystemVersion current major.minor := SystemVersion current minor.   
 (major = 6 and: [ SystemVersion current highestUpdate >= 60509 ])  
  ifTrue: [ minor := 1 ].stream << major 
asString; << minor asString ]"pha

Thanks for considerations,

Dario

P.S. In the same environment one hold  Pharo 7.0-64 bit ( development 
version ) image ran well with launch command