Server-side Swift: One Startup’s Story.

Mike Silvers
8 min readJan 3, 2019

--

Design decisions for the modern technical infrastructure will impact a company for years to come. Strong new players have entered the technical playing field over the past few years. One of these players, Swift, has been gaining popularity and traction since its first release in 2014. Since its inception, there has been strong interest in server side Swift.

In this article I will discuss the server infrastructure design for our company. Our products focus on digitizing coin currency for consumers while reducing coin handling costs for retailers. Six products support our mission. They include:

  1. Mobile Application: The mobile application was written for both the Apple platform (iOS) and the Android platform.
  2. Software Development Kit (SDK): The SDK is the interface for external vendors to access our system. We provide both an iOS and Android version.
  3. Marketing Application: This iPad-specific application allows a marketing team to access system resources when demonstrating and promoting to consumers.
  4. Point Of Sale (POS) Integration: We integrated the SDK in an Android-based tablet POS system. This allows retailers to use the Clover POS register and interact with our services.
  5. Handheld Terminal: The handheld terminal is Android-based and self-contained. The terminal allows retailers without a POS system or with a non-integrated POS system to use our services.
  6. Server: The server processes information, makes decisions and interacts with all other products to provide a robust system for consumers and retailers. The server is the focus of this article.

At the time I joined the company, it had two years of development. Products were not defined and were not in a state where they could be brought to market for consumers. The company was founded by a team of smart businessmen with a great idea, but they were not familiar with the technical processes required to bring their idea to commercially viable life. My partner and I were running a consulting company when we were introduced to the company. We decided to join the company and help steer technology decisions to create a robust manageable, and scalable system. The journey begins….

A unique and diverse set of stakeholders, including consumers, the management team, marketing team, developers, financial institutions, point of sale companies, open loop and closed loop gift card companies, non-profits, blockchain interface companies, and retailers, meant varied — and not always aligned — needs. After a careful analysis of the stakeholder needs, we formulated the robust set of requirements for the project.

Platform Flexibility. The base server platform must be able to scale quickly and easily, be able to maintain the current load and expand during times of increased loads as well as decrease at times of minimal load, and be able to move from provider to provider based on stakeholder requirements.

Security. The server must adhere to industry standard security practices. In addition, new security measures must be easily integrated in the system. A multifaceted approach to security must be supported by the underlying server software and systems.

Cost Effectiveness. The platform must be cost effective related to development, maintenance, ongoing costs, and development resources. We do not want to be bleeding edge as this generally increases the cost of the project and adds unnecessary risk.

Efficient Use of Resources. In order to reduce costs and increase the effectiveness of the development team, the selection of programming languages will greatly impact the efficient use of resources. We want to provide a structure in which developers are able to create multiple products.

Platform Stability. The base platform must be stable, efficient and have a strong technical and user support group. In addition, resources for the platform must be available in the future.

Cost Effective Maintenance and Enhancement. The initial minimal viable product (MVP) will require updates and maintenance to keep the system running, maintain efficiency and be enhanced quickly and easily. Any changes had to be completed in a cost effective manner.

Industry Standard. All components of the system need to employ industry standard practices. Although new innovation will be occurring with this project, industry standard practices must be maintained.

Audit Blockchain. We are integrating an audit blockchain into the products. The server must be able to communicate with our blockchain partner using its APIs.

File Transfer. Several file transfer formats are required to communicate with the financial organizations, open loop and closed loop gift card providers, and non-profits. The file transfer includes the physical transfer as well as preparing the files for transfer in the proper format.

The first decision to be made was the base server system. Base system selection generally invokes strong emotional responses from systems designers, developers, IT managers and even other stakeholders within the company. A response quite often expressed is, “My trusted friend John has used Ruby on Rails for years. He says that it is the best and most secure system out there and we should use it.” Removing emotional bias from the decision making process, and instead using the existing and future requirements as the basis for the decision was the appropriate methodology for server system selection. All the systems available are strong, but they are not recommended for every use case.

I have experiences using the LAMP stack (Linux, Apache, MySQL, PHP), IBM System i, Linux based Ruby on Rails, Microsoft IIS, and server-side Swift. Server-side Swift has matured quickly and has become a strong production ready system. We determined that the system that exceeds all of our requirements is server-side Swift. In addition to Swift’s capabilities, we can maximize our resources. For example, the iOS developers are able to program the server with minimal effort. Using Kotlin as the language for Android, the learning curve for Android developers to learn Swift is minimal. A system that exceeds stakeholder requirements and allows for effective and efficient developer resource allocations, server-side Swift is the correct choice for our company.

One decision down; more to come. The next decision was the framework. The framework organizes code and provides predetermined functions. We have the option of using no framework and building everything internally, using an open source framework, using a proprietary framework, or using a combination. I selected the open source framework for two reasons. First, the framework will provide basic services and functions that we need. Second, we will be able to utilize the experience of hundreds of developers to continue enhancing the core framework.

Perfect Server framework was selected due to its overall functionality, speed, and responsiveness of its team for support. It utilizes Slack as the main communications channel for support, has an active community, and its employees monitor the Slack channel. In addition, it provides a resource, Perfect Assistant, to make the distribution and configuration on Amazon Web Services, Google Cloud, and Alibaba Cloud Services simple and straightforward.

Although the focus of this article is not a comparison of server-side Swift frameworks, this article, Current Features & Benefits of the Top Server-Side Swift Frameworks by Ryan Collins provides a comprehensive review of the 4 major server-side Swift frameworks.

Now for the fun part, development. Which leads to the question: How will we go from stakeholder requirements to a production-ready system in the shortest possible time while watching our budget? Since you asked, let me tell you how we did it in four short months.

We realized we needed to maximize our developers productivity, while adhering to a startup budget. In the past I had poor experiences with outsourcing development staff. These included significant problems with communications and developers’ skill levels. This time we approached outsourcing as if we were hiring new employees. We identified an amazing company in the Philippines to serve as our outsourcing partner, CloudStaff. If you want more information about the company, please contact me.

To make sure the team was the strongest we could put together, we setup interviews with candidates provided by CloudStaff. The interviews included communications skills, coding skills, and general aptitude. We wanted to make sure that developers would work well together as a team. Now we have our team assembled — developers in the US and developers in the Philippines.

Stakeholders and members of the development team are spread out across timezones, with the maximum being 12 hours apart. With multiple time differences and a massive project ahead, communications and structure will be key to its success. Agile methodologies would bring us the quickest results in the shortest amount of time. We decided on the Scrum approach rather than Kanban approach. A combination of 9:00 AM EST stand-ups and JIRA provided efficient communications with the team. There were no significant language barriers among team members.

We treat all team members as the educated, skilled, and valuable assets they are; we would not have selected them if they were not up to the task. Valuing each team member’s opinion worked extremely well. Members of the team respected each other and gave their best for the project. It is an amazing feeling to lead this team.

So fast forward through 4 months of hard work, long hours and long weeks. In that period, we released the iOS and Android consumer apps to their respective App Stores; released the server to three environments, including production; integrated the Clover POS system and submitted it to the App Store; released an Android and iOS SDK with newly updated API definitions; nearly completed the Marketing iPad app; and nearly completed the Handheld Terminal app. The server environments proved to be crucial to the development of all other products. The speed and efficiency in which the development server instance was created provided the groundwork for all other product development. Server-side Swift made this project a success.

While we still have many stories on our scrum board, things like creating a retailer web interface, creating a consumer web interface, UI/UX changes to the mobile apps, creating an internal reporting system, and integrating HubSpot are all on the roadmap, server-side Swift was the right choice for us. As a startup, we needed an efficient, cost effective platform that uses resources as efficiently as possible while maintaining a secure, robust, and dynamic platform. We found it in Swift.

--

--

Mike Silvers

A career IT guy who loves new technology, leading teams, and developing new and interesting applications, especially iOS application. And I love cycling.