[Pharo-users] Microservices using Pharo

Torsten Bergmann astares at gmx.de
Wed Jun 27 02:24:02 EDT 2018

Hi Andrei,

I guess there is no definitive answer - it highly depends on your microservice itself
and what it does with other backends (database, other services)

- If you run on Seaside with state then this might be interesting:

  If you want to scale then stateful might not be the best way to go - this is not different from other web technologies.
- I prefer the REST and stateless approach, several images with a fast balancer at the 
  front (nginx)

  This is a pattern you more often see in web development as usually 
         - the client side is written in JavaScript as single page app (SPA) or progressive web app (PWA) 
         - and server side  provides a stateless REST API (which opens your application not only to human users using the SPA/PWA 
           but also to other programs and services using the API)
  You can easily provide REST API with Seaside-REST package, with Teapot or with Tealight (an addition I wrote to Teapot).
  Follow the guide for Tealight, especially the last part here:  https://github.com/astares/Tealight 

- Allstocker.com is running with just 2 images and nginx, see the details here

- The enterprise book has some guidance too 

I recommend to make a technical prototype, test and measure. Balancing and scaling is not different
from other technologies (Java, PHP, NodeJS, ...) and there are many tutorials out there for this part.

Think about container technologies and virtualization (for cloud or other). Played with Pharo on docker - very easy to setup. 
I summarized my findings in a new "Pharo and docker" tutorial on http://wiki.astares.com/pharo/613

Hope some of this helps!


More information about the Pharo-users mailing list