Minimalist Framework to create RESTful web services with PHP and nginx

This post is about create a RESTful web service with PHP. I’ve been looking for a mini framework for doing RESTful web service with PHP. However, it is not a easy tasks (nowadays, at least). There was no framework that was easy to use. I’ve just decided to create a minimalist code for doing that.

api.php

<?php
header(‘Content-Type: application/json’);
$action = $_GET[‘action’];
switch ($action) {
case “/registerUser”:
$data = $_POST[‘data’] ;
(processing here..)
echo “json here…”;
break;

}

?>


In you site application in nginx you can configure, for instance like that.

        location / {
                     rewrite  ^(/.*)$ /api.php?action=$1 last;

        }

If you have any question, please do not hesitate to contact me.

Advertisements
| Leave a comment

PACS Archive over the Cloud

In the last two years, I’ve been working on porting clinical and medical applications to the Cloud. Cloud services are now used everywhere. Medical images (DICOM images) can be now securely stored over the Cloud public services. I’ve propose an implementation that deals with privacy issues. I strongly believe that it will be a breakthrough in the medical workflow paradigms in an era where doctors are often using iPhones, Android, iPads and other mobile devices.

http://www.springerlink.com/index/3356857T23061237.pdf

Title: A PACS archive architecture supported on cloud services.

If you have any question, please do not hesitate to contact me. Check out my personal web site: www.bastiao.org.

pacscloud

 

 

Abstract:

Diagnostic imaging procedures have continuously increased over the last decade and this trend may continue in coming years, creating a great impact on storage and retrieval capabilities of current PACS. Moreover, many smaller centers do not have financial resources or requirements that justify the acquisition of a traditional infrastructure. Alternative solutions, such as cloud computing, may help address this emerging need.
A tremendous amount of ubiquitous computational power, such as that provided by Google and Amazon, are used every day as a normal commodity. Taking advantage of this new paradigm, an architecture for a Cloud-based PACS archive that provides data privacy, integrity, and availability is proposed. The solution is independent from the cloud provider and the core modules were successfully instantiated in examples of two cloud computing providers. Operational metrics for several medical imaging modalities were tabulated and compared for Google Storage, Amazon S3, and LAN PACS.
A PACS-as-a-Service archive that provides storage of medical studies using the Cloud was developed. The results show that the solution is robust and that it is possible to store, query, and retrieve all desired studies in a similar way as in a local PACS approach.
Cloud computing is an emerging solution that promises high scalability of infrastructures, software, and applications, according to a “pay-as-you-go” business model. The presented architecture uses the cloud to setup medical data repositories and can have a significant impact on healthcare institutions by reducing IT infrastructures.

| Leave a comment

JDBQueue – Java Persistence Queue

The basic idea of JDBQueue is to have a persistence Queue. Then, if the program need to restart, the queue is restored. Our implementation use a database (sqlite) because serialize a Queue objet is not faster, for each insertion.

This library contains a JDBWorker that runs in a separate Thread and waits for a new incoming Message. Then, the user should implement the interface “ITask” to define the behaviour to handle the messages.

Website: http://bastiao.github.com/JDBQueue/

Check it out in the github: https://github.com/bastiao/JDBQueue

If you have any question, feedback or feature request, please contact me.

| Leave a comment

Migrating PACS to the Cloud

Check it out: http://digital.studio-web.be/digitalMagazine?issue_id=76&jump=22 OR

http://www.dicoogle.com/downloads/IHE-ONLINE_All.pdf

| Leave a comment

Strengths and Weaknesses of Using Cloud Computing in Medical Instituions

Medical institutions have to deal with IT infrastructure everyday. It is out of the scope of there core business. Is cloud computing a solution?

Check it out: http://imagingmanagement.org/journals/articles/strengths_and_weaknesses_using_cloud_computing

| Leave a comment

Java Memory – are you in troubles?

Are you dealing with large data?
First, don’t use heap to store it.

Read it:

http://dsoguy.blogspot.com/2010/09/little-bit-about-bigmemory-for-ehcache.html
http://www.terracotta.org/products/bigmemory
http://www.kdgregory.com/index.php?page=java.byteBuffer

Cheers!

| Leave a comment

Dicoogle – v0.4 is out

“””
Hi folks,

We’re pleasure to announce a new release of Dicoogle (v0.4).

Most significant changes since last release: http://www.dicoogle.com/?p=509

You can download 0.4 at the normal place:
http://www.dicoogle.com/?page_id=67

Tutorial to index DICOM repositories:

Tutorial to search over DICOM repositories:


Quick guide to end-users: http://www.dicoogle.com/downloads/Dicoogle_QuickGuide_v0.4_2011_10_14.pdf

We’ve been testing Dicoogle and deploying it in real environment. Until now more than 6 million files already indexed in health centres. We want to stress that we have been working in a new version of Dicoogle which will allow to share repositories across multiple institutions via GAE cloud. A new plugging mechanism that will provide an easy way to extend Dicoogle functionalities and many others features. The first BETA version of this version will be available in few weeks. Stay tunned!

Finally, but not least, if you find any bug or missing feature, please report us. We’re available to fix or add new features to the Dicoogle mainstream.

Cheers!
“””

| Leave a comment